#include "stage01.h"

int stage01::GetLeftItemNum()
{
	return itemNum;
}
Type stage01::CrashCheck(SDL_Rect pos)
{
	if(pos.y == (50 - 1)*5 && pos.x <= (130 - 1)*5 && pos.x >= (30 - 1)*5 )
		return WALL;
	if(pos.y == itemPos.y && pos.x == itemPos.x ){
		itemNum = 0;
		return ITEM;
	}
	return NOTHING;
}
void stage01::Render(SDL_Surface* screen)
{
	SDL_Rect dstrect;	

	for(int w_i = 30 ; w_i <= 130 ; w_i++)
	{
		dstrect.x = (w_i - 1)*5; 
		dstrect.y = (50 - 1)*5;
		SDL_BlitSurface(wall_Tile, NULL, screen, &dstrect );
	}
	if(itemNum>0)
		SDL_BlitSurface(item_Tile, NULL, screen, &itemPos );
}